package webservices;

public class HealthCareServerProxy implements webservices.HealthCareServer {
  private String _endpoint = null;
  private webservices.HealthCareServer healthCareServer = null;
  
  public HealthCareServerProxy() {
    _initHealthCareServerProxy();
  }
  
  public HealthCareServerProxy(String endpoint) {
    _endpoint = endpoint;
    _initHealthCareServerProxy();
  }
  
  private void _initHealthCareServerProxy() {
    try {
      healthCareServer = (new webservices.HealthCareServerServiceLocator()).getHealthCareServer();
      if (healthCareServer != null) {
        if (_endpoint != null)
          ((javax.xml.rpc.Stub)healthCareServer)._setProperty("javax.xml.rpc.service.endpoint.address", _endpoint);
        else
          _endpoint = (String)((javax.xml.rpc.Stub)healthCareServer)._getProperty("javax.xml.rpc.service.endpoint.address");
      }
      
    }
    catch (javax.xml.rpc.ServiceException serviceException) {}
  }
  
  public String getEndpoint() {
    return _endpoint;
  }
  
  public void setEndpoint(String endpoint) {
    _endpoint = endpoint;
    if (healthCareServer != null)
      ((javax.xml.rpc.Stub)healthCareServer)._setProperty("javax.xml.rpc.service.endpoint.address", _endpoint);
    
  }
  
  public webservices.HealthCareServer getHealthCareServer() {
    if (healthCareServer == null)
      _initHealthCareServerProxy();
    return healthCareServer;
  }
  
  public java.lang.String registration(java.lang.String fname, java.lang.String lname, java.lang.String email, java.lang.String age, java.lang.String sex, java.lang.String password) throws java.rmi.RemoteException{
    if (healthCareServer == null)
      _initHealthCareServerProxy();
    return healthCareServer.registration(fname, lname, email, age, sex, password);
  }
  
  public webservices.User login(java.lang.String userName, java.lang.String password) throws java.rmi.RemoteException{
    if (healthCareServer == null)
      _initHealthCareServerProxy();
    return healthCareServer.login(userName, password);
  }
  
  public java.lang.String postQues(java.lang.String label, java.lang.String ques, java.lang.String useremail, java.lang.String date) throws java.rmi.RemoteException{
    if (healthCareServer == null)
      _initHealthCareServerProxy();
    return healthCareServer.postQues(label, ques, useremail, date);
  }
  
  public webservices.Doctor doclogin(java.lang.String userName, java.lang.String password) throws java.rmi.RemoteException{
    if (healthCareServer == null)
      _initHealthCareServerProxy();
    return healthCareServer.doclogin(userName, password);
  }
  
  public java.lang.String getPosts(java.lang.String username) throws java.rmi.RemoteException{
    if (healthCareServer == null)
      _initHealthCareServerProxy();
    return healthCareServer.getPosts(username);
  }
  
  public boolean deletePosts(int postId) throws java.rmi.RemoteException{
    if (healthCareServer == null)
      _initHealthCareServerProxy();
    return healthCareServer.deletePosts(postId);
  }
  
  public void saveComment(java.lang.String id, java.lang.String comment, java.lang.String user, java.lang.String date) throws java.rmi.RemoteException{
    if (healthCareServer == null)
      _initHealthCareServerProxy();
    healthCareServer.saveComment(id, comment, user, date);
  }
  
  public java.lang.String doclist(java.lang.String docid, java.lang.String userid) throws java.rmi.RemoteException{
    if (healthCareServer == null)
      _initHealthCareServerProxy();
    return healthCareServer.doclist(docid, userid);
  }
  
  public java.lang.String getDocList(java.lang.String userid, java.lang.String spec) throws java.rmi.RemoteException{
    if (healthCareServer == null)
      _initHealthCareServerProxy();
    return healthCareServer.getDocList(userid, spec);
  }
  
  public java.lang.String postQuesDoc(java.lang.String doctorid, java.lang.String label, java.lang.String ques, java.lang.String userid, java.lang.String date) throws java.rmi.RemoteException{
    if (healthCareServer == null)
      _initHealthCareServerProxy();
    return healthCareServer.postQuesDoc(doctorid, label, ques, userid, date);
  }
  
  public java.lang.String getDocPosts(java.lang.String userid, java.lang.String docids) throws java.rmi.RemoteException{
    if (healthCareServer == null)
      _initHealthCareServerProxy();
    return healthCareServer.getDocPosts(userid, docids);
  }
  
  public java.lang.String postArticle(java.lang.String label, java.lang.String article, java.lang.String doctorid, java.lang.String tags, java.lang.String date) throws java.rmi.RemoteException{
    if (healthCareServer == null)
      _initHealthCareServerProxy();
    return healthCareServer.postArticle(label, article, doctorid, tags, date);
  }
  
  public boolean deleteUsers(int userid, int docid) throws java.rmi.RemoteException{
    if (healthCareServer == null)
      _initHealthCareServerProxy();
    return healthCareServer.deleteUsers(userid, docid);
  }
  
  public boolean deleteDocPosts(int postId) throws java.rmi.RemoteException{
    if (healthCareServer == null)
      _initHealthCareServerProxy();
    return healthCareServer.deleteDocPosts(postId);
  }
  
  public void savedocComment(java.lang.String id, java.lang.String comment, java.lang.String user, java.lang.String date) throws java.rmi.RemoteException{
    if (healthCareServer == null)
      _initHealthCareServerProxy();
    healthCareServer.savedocComment(id, comment, user, date);
  }
  
  public java.lang.String getDocusersList(java.lang.String docid) throws java.rmi.RemoteException{
    if (healthCareServer == null)
      _initHealthCareServerProxy();
    return healthCareServer.getDocusersList(docid);
  }
  
  public java.lang.String getDocArticlesList(java.lang.String docid) throws java.rmi.RemoteException{
    if (healthCareServer == null)
      _initHealthCareServerProxy();
    return healthCareServer.getDocArticlesList(docid);
  }
  
  public boolean deleteDoctors(int userid, int docid) throws java.rmi.RemoteException{
    if (healthCareServer == null)
      _initHealthCareServerProxy();
    return healthCareServer.deleteDoctors(userid, docid);
  }
  
  public boolean deleteArticles(int docid, int articleid) throws java.rmi.RemoteException{
    if (healthCareServer == null)
      _initHealthCareServerProxy();
    return healthCareServer.deleteArticles(docid, articleid);
  }
  
  public java.lang.String getDocUserPosts(java.lang.String userid, java.lang.String docid) throws java.rmi.RemoteException{
    if (healthCareServer == null)
      _initHealthCareServerProxy();
    return healthCareServer.getDocUserPosts(userid, docid);
  }
  
  public void savedocUserComment(java.lang.String id, java.lang.String comment, java.lang.String user, java.lang.String date) throws java.rmi.RemoteException{
    if (healthCareServer == null)
      _initHealthCareServerProxy();
    healthCareServer.savedocUserComment(id, comment, user, date);
  }
  
  
}